package com.itheima.bakery.demos.web.Repositories;

import com.itheima.bakery.demos.web.model.Order;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.itheima.bakery.demos.web.model.ShippingAddress;
import java.util.Optional;
import java.util.List;
@Repository
public interface OrderRepository extends JpaRepository<Order, Integer> {
    List<Order> findByUserID(Integer userID);
    List<Order> findByOrderIDContaining(String keyword);
    Optional<ShippingAddress> findShippingAddressByOrderID(Integer orderId);
}